-- GENERATED SPELL FOR [Witherbark Shadowcaster] --


function spell0_2553(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20816,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2553', 3000, 1)
end

function spell1_2553(pUnit, Event) --@Summon Imp,Self--
pUnit:FullCastSpellOnTarget(11939,pUnit)
pUnit:RegisterEvent('Sorts_2553', 640, 1)
end

function Sorts_2553(pUnit, Event)
local choix_sorts_2553 = math.random(0, 1)
if choix_sorts_2553 == 0 then
pUnit:RegisterEvent('spell0_2553', 1, 1)
end
if choix_sorts_2553 == 1 then
pUnit:RegisterEvent('spell1_2553', 1, 1)
end
end

function mob2553_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2553', math.random(1500, 3000), 1)
end

function mob2553_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2553_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2553_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2553, 1, 'mob2553_Action')
RegisterUnitEvent(2553, 2, 'mob2553_Leave')
RegisterUnitEvent(2553, 3, 'mob2553_Kill')
RegisterUnitEvent(2553, 4, 'mob2553_Die')
